From: Colin Walters Date: Thu, 6 Aug 2009 00:07:30 +0000 (-0400) Subject: ShellAppMonitor: Fix case of not seeing apps being closed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~11153 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=90979faedd70d569f16f56a546cf330dc116d636;p=gnome-shell.git ShellAppMonitor: Fix case of not seeing apps being closed Remove the app from the window_to_app hash *before* emitting CHANGED, otherwise a signal handler could see stale data. --- diff --git a/src/shell-app-monitor.c b/src/shell-app-monitor.c index 57107047e..f3bf7050e 100644 --- a/src/shell-app-monitor.c +++ b/src/shell-app-monitor.c @@ -532,10 +532,11 @@ shell_app_monitor_on_window_removed (MetaWorkspace *workspace, self->watched_window = NULL; usage->window_count--; + /* Remove before emitting */ + g_hash_table_remove (self->window_to_app, window); + if (usage->window_count == 0) g_signal_emit (self, signals[CHANGED], 0); - - g_hash_table_remove (self->window_to_app, window); } static void